
<div>
	<hr>
	<jhi-alert></jhi-alert>
	<!-- <jhi-alert-error></jhi-alert-error> -->
	<dl class="dl-horizontal jh-entity-details">
		<dd>
			<span>{{vm.vote.questionnaire.title}}</span>
		</dd>

		<dt>
			<span data-translate="milkbeeApp.questionnaire.endAt">End At</span>
		</dt>
		<dd>
			<span>{{vm.vote.questionnaire.endAt | date:'medium'}}</span>
		</dd>
		<dd>
			<span>{{vm.vote.questionnaire.detail}}</span>
		</dd>
	</dl>
	<form name="editForm" role="form" novalidate ng-submit="vm.save()">
		<ul class="list-group">
			<li class="list-group-item"
				ng-repeat="candidate in vm.vote.candidates"><input
				type="checkbox" class="cl" id="candidate{{candidate.id}}"
				ng-model="vm.cands[$index]">{{candidate.content}} 
				<div class="progress">
					<div class="progress-bar" role="progressbar" aria-valuenow="{{candidate.vote}}"
						aria-valuemin="0" aria-valuemax="vm.vote.gross" style="width:{{100*candidate.vote/vm.vote.gross}}%;">{{candidate.vote}}</div>
				</div></li>
		</ul>

		<button type="submit" ui-sref="{{ vm.previousState }}"
			class="btn btn-info">
			<span class="glyphicon glyphicon-arrow-left"></span>&nbsp;<span
				data-translate="entity.action.back"> Back</span>
		</button>
		<button type="submit" id="submitBtn"
			ng-disabled="editForm.title.$invalid || vm.cannotpost"
			class="btn btn-primary">
			<span class="glyphicon glyphicon-ok"></span>&nbsp;<span
				data-translate="entity.action.save">Save</span>
		</button>
	</form>
</div>
